using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;

using MJB.UI.ContentEditor.Document;

namespace MJB.UI.ContentEditor.Document.Version1
{

    /// <summary>
    /// </summary>
    public class SectionVersion1 : DependencyObject, ISection
    {
        #region Dependecy Properties

        /// <summary>
        /// This is the title of the section.
        /// </summary>
        public static readonly DependencyProperty SectionTitleProperty = DependencyProperty.Register("SectionTitle",
            typeof(string),
            typeof(SectionVersion1),
            new PropertyMetadata(String.Empty));

        /// <summary>
        /// Determines whether or not the last modified boolean is used.
        /// </summary>
        public static readonly DependencyProperty UsesLastModifiedProperty = DependencyProperty.Register("UsesLastModified",
            typeof(bool),
            typeof(SectionVersion1),
            new PropertyMetadata(false));

        /// <summary>
        /// This is the date time that this section was last modified.
        /// </summary>
        public static readonly DependencyProperty LastModifiedProperty = DependencyProperty.Register("LastModified",
            typeof(DateTime),
            typeof(SectionVersion1),
            new PropertyMetadata(DateTime.MaxValue));

        /// <summary>
        /// This is the section text.
        /// </summary>
        public static readonly DependencyProperty SectionTextProperty = DependencyProperty.Register("SectionText",
            typeof(string),
            typeof(SectionVersion1),
            new PropertyMetadata(String.Empty));

        #endregion
        #region Constructor

        /// <summary>
        /// Creates the section object.
        /// </summary>
        public SectionVersion1()
        {
        }

        #endregion
        #region ISection Members

        /// <summary>
        /// Gets / sets the section title.
        /// </summary>
        public string SectionTitle
        {
            get
            {
                return (string)GetValue(SectionTitleProperty);
            }
            set
            {
                SetValue(SectionTitleProperty, value);
            }
        }

        /// <summary>
        /// Gets / sets the _usesLastModified value.
        /// </summary>
        public bool UsesLastModified
        {
            get
            {
                return (bool)GetValue(UsesLastModifiedProperty);
            }
            set
            {
                SetValue(UsesLastModifiedProperty, value);
            }
        }

        /// <summary>
        /// Gets / sets the last modified flag.
        /// </summary>
        public DateTime LastModified
        {
            get
            {
                return (DateTime)GetValue(LastModifiedProperty);
            }
            set
            {
                SetValue(LastModifiedProperty, value);
            }
        }

        /// <summary>
        /// Gets / sets the section text.
        /// </summary>
        public string SectionText
        {
            get
            {
                return (string)GetValue(SectionTextProperty);
            }
            set
            {
                SetValue(SectionTextProperty, value);
            }
        }

        #endregion

    }

}
